﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using SocialVoting.Models;

namespace SocialVoting.Controllers
{
    public class ThemeController : Controller
    {
        //
        // GET: /Theme/

        [HttpPost]
        public ActionResult Index(string theme)
        {    
            var themeCookie = new HttpCookie("ThemeName", theme);
            HttpContext.Response.Cookies.Add(themeCookie);
            const string controller = "Home";
            const string action = "Index";
            return Redirect(string.Format("~/{0}/{1}", controller, action));
        }
         
    }
}
